<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FEUP-Defender: Music</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gerado por Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="../../main.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="../../modules.html"><span>Módulos</span></a></li>
      <li><a href="../../annotated.html"><span>Estruturas&nbsp;de&nbsp;dados</span></a></li>
      <li><a href="../../files.html"><span>Ficheiros</span></a></li>
      <li><a href="../../dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Music</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Estruturas de Dados</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d47/struct_note.html">Note</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/da7/struct_song.html">Song</a></td></tr>
<tr><td colspan="2"><h2>Enumerações</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#gaefe1643414c0ec93d38868109a8184cc">NotesN</a> { <br/>
&nbsp;&nbsp;<b>C0</b>, 
<b>Cs0</b>, 
<b>D0</b>, 
<b>Ds0</b>, 
<br/>
&nbsp;&nbsp;<b>E0</b>, 
<b>F0</b>, 
<b>Fs0</b>, 
<b>G0</b>, 
<br/>
&nbsp;&nbsp;<b>Gs0</b>, 
<b>A0</b>, 
<b>As0</b>, 
<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</b>, 
<br/>
&nbsp;&nbsp;<b>E6</b>, 
<b>F6</b>, 
<b>Fs6</b>, 
<b>G6</b>, 
<br/>
&nbsp;&nbsp;<b>Gs6</b>, 
<b>A6</b>, 
<b>As6</b>, 
<b>B6</b>, 
<br/>
&nbsp;&nbsp;<b>C7</b>, 
<b>Cs7</b>, 
<b>D7</b>, 
<b>Ds7</b>, 
<br/>
&nbsp;&nbsp;<b>E7</b>, 
<b>F7</b>, 
<b>Fs7</b>, 
<b>G7</b>, 
<br/>
&nbsp;&nbsp;<b>Gs7</b>, 
<b>A7</b>, 
<b>As7</b>, 
<b>B7</b>, 
<br/>
&nbsp;&nbsp;<b>C8</b>, 
<b>Cs8</b>, 
<b>D8</b>, 
<b>Ds8</b>
<br/>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#ga6a7bb071c9718266fe2a1d43d56fe132">NotesP</a> { <br/>
&nbsp;&nbsp;<b>Do0</b>, 
<b>Dos0</b>, 
<b>Re0</b>, 
<b>Res0</b>, 
<br/>
&nbsp;&nbsp;<b>Mi0</b>, 
<b>Fa0</b>, 
<b>Fas0</b>, 
<b>Sol0</b>, 
<br/>
&nbsp;&nbsp;<b>Sols0</b>, 
<b>La0</b>, 
<b>Las0</b>, 
<b>Si0</b>, 
<br/>
&nbsp;&nbsp;<b>Do1</b>, 
<b>Dos1</b>, 
<b>Re1</b>, 
<b>Res1</b>, 
<br/>
&nbsp;&nbsp;<b>Mi1</b>, 
<b>Fa1</b>, 
<b>Fas1</b>, 
<b>Sol1</b>, 
<br/>
&nbsp;&nbsp;<b>Sols1</b>, 
<b>La1</b>, 
<b>Las1</b>, 
<b>Si1</b>, 
<br/>
&nbsp;&nbsp;<b>Do2</b>, 
<b>Dos2</b>, 
<b>Re2</b>, 
<b>Res2</b>, 
<br/>
&nbsp;&nbsp;<b>Mi2</b>, 
<b>Fa2</b>, 
<b>Fas2</b>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sp;&nbsp;<b>Sols7</b>, 
<b>La7</b>, 
<b>Las7</b>, 
<b>Si7</b>, 
<br/>
&nbsp;&nbsp;<b>Do8</b>, 
<b>Dos8</b>, 
<b>Re8</b>, 
<b>Res8</b>
<br/>
 }</td></tr>
<tr><td colspan="2"><h2>Funções</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#ga8775bebfe360d9a11f9b163457033d47">speaker_on</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#gaddcc91b3923481afa543b7bfa7a48409">speaker_off</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#gad0b94ab781561a4be7a2b2005da9ff92">play_note</a> (<a class="el" href="../../d1/d47/struct_note.html">Note</a> *note)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#ga67d79eecd73c5954729a7dd34af5d1c5">play_song</a> (<a class="el" href="../../d8/da7/struct_song.html">Song</a> *s)</td></tr>
<tr><td colspan="2"><h2>Variáveis</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/de2/group___music.html#ga14961692ca6c47d43cc4f13219156abd">notes_frequency</a> []</td></tr>
</table>
<hr/><a name="_details"></a><h2>Descrição detalhada</h2>
<p>Music related functions </p>
<hr/><h2>Documentação dos valores da enumeração</h2>
<a class="anchor" id="gaefe1643414c0ec93d38868109a8184cc"></a><!-- doxytag: member="music.h::NotesN" ref="gaefe1643414c0ec93d38868109a8184cc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d0/de2/group___music.html#gaefe1643414c0ec93d38868109a8184cc">NotesN</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Natural notes names. 's' means sharp, e.g. Ds is D# The central octave is the fourth, thus C4 is the "central C" </p>

<p>Definido na linha <a class="el" href="../../#L55">55</a> do ficheiro <a class="el" href="../../">music.h</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00055"></a>00055             { C0, Cs0, D0, Ds0, E0, F0, Fs0, G0, Gs0, A0, As0, B0,
<a name="l00056"></a>00056               C1, Cs1, D1, Ds1, E1, F1, Fs1, G1, Gs1, A1, As1, B1,
<a name="l00057"></a>00057               C2, Cs2, D2, Ds2, E2, F2, Fs2, G2, Gs2, A2, As2, B2,
<a name="l00058"></a>00058               C3, Cs3, D3, Ds3, E3, F3, Fs3, G3, Gs3, A3, As3, B3,
<a name="l00059"></a>00059               C4, Cs4, D4, Ds4, E4, F4, Fs4, G4, Gs4, A4, As4, B4,
<a name="l00060"></a>00060               C5, Cs5, D5, Ds5, E5, F5, Fs5, G5, Gs5, A5, As5, B5,
<a name="l00061"></a>00061               C6, Cs6, D6, Ds6, E6, F6, Fs6, G6, Gs6, A6, As6, B6,
<a name="l00062"></a>00062               C7, Cs7, D7, Ds7, E7, F7, Fs7, G7, Gs7, A7, As7, B7,
<a name="l00063"></a>00063               C8, Cs8, D8, Ds8};
</pre></div></p>

</div>
</div>
<a class="anchor" id="ga6a7bb071c9718266fe2a1d43d56fe132"></a><!-- doxytag: member="music.h::NotesP" ref="ga6a7bb071c9718266fe2a1d43d56fe132" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d0/de2/group___music.html#ga6a7bb071c9718266fe2a1d43d56fe132">NotesP</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>French/Italian/Spanish/Portuguese notes names. 's' means sharp, e.g. Ds is D# The central octave is the fourth, thus Do4 is the "central Do" </p>

<p>Definido na linha <a class="el" href="../../#L69">69</a> do ficheiro <a class="el" href="../../">music.h</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00069"></a>00069             { Do0, Dos0, Re0, Res0, Mi0, Fa0, Fas0, Sol0, Sols0, La0, Las0, Si0,
<a name="l00070"></a>00070               Do1, Dos1, Re1, Res1, Mi1, Fa1, Fas1, Sol1, Sols1, La1, Las1, Si1,
<a name="l00071"></a>00071               Do2, Dos2, Re2, Res2, Mi2, Fa2, Fas2, Sol2, Sols2, La2, Las2, Si2,
<a name="l00072"></a>00072               Do3, Dos3, Re3, Res3, Mi3, Fa3, Fas3, Sol3, Sols3, La3, Las3, Si3,
<a name="l00073"></a>00073               Do4, Dos4, Re4, Res4, Mi4, Fa4, Fas4, Sol4, Sols4, La4, Las4, Si4,
<a name="l00074"></a>00074               Do5, Dos5, Re5, Res5, Mi5, Fa5, Fas5, Sol5, Sols5, La5, Las5, Si5,
<a name="l00075"></a>00075               Do6, Dos6, Re6, Res6, Mi6, Fa6, Fas6, Sol6, Sols6, La6, Las6, Si6,
<a name="l00076"></a>00076               Do7, Dos7, Re7, Res7, Mi7, Fa7, Fas7, Sol7, Sols7, La7, Las7, Si7,
<a name="l00077"></a>00077               Do8, Dos8, Re8, Res8};
</pre></div></p>

</div>
</div>
<hr/><h2>Documentação das funções</h2>
<a class="anchor" id="gad0b94ab781561a4be7a2b2005da9ff92"></a><!-- doxytag: member="music.h::play_note" ref="gad0b94ab781561a4be7a2b2005da9ff92" args="(Note *note)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void play_note </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d1/d47/struct_note.html">Note</a> *&nbsp;</td>
          <td class="paramname"> <em>note</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Plays a single note </p>

<p>Definido na linha <a class="el" href="../../#L49">49</a> do ficheiro <a class="el" href="../../">music.c</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00050"></a>00050 {
<a name="l00051"></a>00051         <span class="keywordtype">int</span> valor = <a class="code" href="../../d7/d38/group___timer_counter.html#gae5af43ac16a34537dd1799ef08229aef" title="The timers input frequency.">TIMER_CLK</a>/<a class="code" href="../../d0/de2/group___music.html#ga14961692ca6c47d43cc4f13219156abd">notes_frequency</a>[note-&gt;<a class="code" href="../../d1/d47/struct_note.html#ae0d22272b68e75d19ac0b80c01f806b6">freq</a>];
<a name="l00052"></a>00052         <a class="code" href="../../d7/d38/group___timer_counter.html#gae17f36dbe5d10ebced7a88cc463a7ea9">timer_load</a>(2, valor);
<a name="l00053"></a>00053         <a class="code" href="../../d0/de2/group___music.html#ga8775bebfe360d9a11f9b163457033d47">speaker_on</a>();
<a name="l00054"></a>00054         <a class="code" href="../../d7/d38/group___timer_counter.html#ga41884d7120e9408d1c5719e2858f6564">mili_sleep</a>(note-&gt;<a class="code" href="../../d1/d47/struct_note.html#a73f92e4b544debeb52d1aa18d43f72fe">dur</a>);
<a name="l00055"></a>00055         <a class="code" href="../../d0/de2/group___music.html#gaddcc91b3923481afa543b7bfa7a48409">speaker_off</a>();
<a name="l00056"></a>00056         
<a name="l00057"></a>00057 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ga67d79eecd73c5954729a7dd34af5d1c5"></a><!-- doxytag: member="music.h::play_song" ref="ga67d79eecd73c5954729a7dd34af5d1c5" args="(Song *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void play_song </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d8/da7/struct_song.html">Song</a> *&nbsp;</td>
          <td class="paramname"> <em>s</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Plays a song using busy-waiting </p>
<pre>
  usage example:</pre><pre>  <a class="el" href="../../d1/d47/struct_note.html">Note</a> notes[] = {{Sol6, 100}, {Mi6,50}, {Sol6, 50}, {Mi6, 25}}; 
  <a class="el" href="../../d8/da7/struct_song.html">Song</a> s = { sizeof(notes)/sizeof(<a class="el" href="../../d1/d47/struct_note.html">Note</a>), 10, notes};</pre><pre>  play_song(&amp;s);
</pre> 
<p>Definido na linha <a class="el" href="../../#L60">60</a> do ficheiro <a class="el" href="../../">music.c</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00061"></a>00061 {
<a name="l00062"></a>00062         <span class="keywordtype">int</span> i = 0;
<a name="l00063"></a>00063         <span class="keywordflow">for</span>(; i &lt; s-&gt;<a class="code" href="../../d8/da7/struct_song.html#a9f59b34b1f25fe00023291b678246bcc">length</a>; i++)
<a name="l00064"></a>00064         {
<a name="l00065"></a>00065                 <a class="code" href="../../d0/de2/group___music.html#gad0b94ab781561a4be7a2b2005da9ff92">play_note</a>(s-&gt;<a class="code" href="../../d8/da7/struct_song.html#a10cb29a1557cd82ba21e4185768384ae">notes</a>+i);
<a name="l00066"></a>00066                 <a class="code" href="../../d7/d38/group___timer_counter.html#ga41884d7120e9408d1c5719e2858f6564">mili_sleep</a>(s-&gt;<a class="code" href="../../d8/da7/struct_song.html#a079a8936e6182a94af728b960e9345e7">pause</a>);
<a name="l00067"></a>00067         }
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="gaddcc91b3923481afa543b7bfa7a48409"></a><!-- doxytag: member="music.h::speaker_off" ref="gaddcc91b3923481afa543b7bfa7a48409" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void speaker_off </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Turns the speeker off </p>

<p>Definido na linha <a class="el" href="../../#L42">42</a> do ficheiro <a class="el" href="../../">music.c</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00043"></a>00043 {
<a name="l00044"></a>00044         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> v = inportb(<a class="code" href="../../d7/d38/group___timer_counter.html#ga51b3a5e3d4811ca063fe25e35560ab40" title="The address of a generic PC register, whose bits 0 and 1 control the timer2 clock...">SPEAKER_CTRL</a>);
<a name="l00045"></a>00045         outportb(<a class="code" href="../../d7/d38/group___timer_counter.html#ga51b3a5e3d4811ca063fe25e35560ab40" title="The address of a generic PC register, whose bits 0 and 1 control the timer2 clock...">SPEAKER_CTRL</a>, v &amp; ~<a class="code" href="../../d7/d38/group___timer_counter.html#gaddc08f0751fd696a4a21d7e20ce96765" title="Enable Timer 2 output to speaker.">SPEAKER_ENABLE</a>);
<a name="l00046"></a>00046 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ga8775bebfe360d9a11f9b163457033d47"></a><!-- doxytag: member="music.h::speaker_on" ref="ga8775bebfe360d9a11f9b163457033d47" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void speaker_on </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Turns the speeker on </p>

<p>Definido na linha <a class="el" href="../../#L34">34</a> do ficheiro <a class="el" href="../../">music.c</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00035"></a>00035 {
<a name="l00036"></a>00036         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> v = inportb(<a class="code" href="../../d7/d38/group___timer_counter.html#ga51b3a5e3d4811ca063fe25e35560ab40" title="The address of a generic PC register, whose bits 0 and 1 control the timer2 clock...">SPEAKER_CTRL</a>);
<a name="l00037"></a>00037         outportb(<a class="code" href="../../d7/d38/group___timer_counter.html#ga51b3a5e3d4811ca063fe25e35560ab40" title="The address of a generic PC register, whose bits 0 and 1 control the timer2 clock...">SPEAKER_CTRL</a>, v | <a class="code" href="../../d7/d38/group___timer_counter.html#gaddc08f0751fd696a4a21d7e20ce96765" title="Enable Timer 2 output to speaker.">SPEAKER_ENABLE</a>);     
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 }
</pre></div></p>

</div>
</div>
<hr/><h2>Documentação das variáveis</h2>
<a class="anchor" id="ga14961692ca6c47d43cc4f13219156abd"></a><!-- doxytag: member="music.h::notes_frequency" ref="ga14961692ca6c47d43cc4f13219156abd" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="../../d0/de2/group___music.html#ga14961692ca6c47d43cc4f13219156abd">notes_frequency</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Notes frequencies, in Hz, synchronized with arrays NotesN and NotesP. E.G. frequency[Do4] is the frequency of a central Do, 261.63Hz</p>
<p>NOTICE: this array is NOT defined in this header file, as variables should not be declared in header files. You have to copy/paste it to a source file (*.c).</p>
<p>float notes_frequency[] = { 16.35, 17.32, 18.35, 19.45, 20.6, 21.83, 23.12, 24.5, 25.96, 27.5, 29.14, 30.87, 32.7, 34.65, 36.71, 38.89, 41.2, 43.65, 46.25, 49, 51.91, 55, 58.27, 61.74, 65.41, 69.3, 73.42, 77.78, 82.41, 87.31, 92.5, 98, 103.83, 110, 116.54, 123.47, 130.81, 138.59, 146.83, 155.56, 164.81, 174.61, 185, 196, 207.65, 220, 233.08, 246.94, 261.63, 277.18, 293.66, 311.13, 329.63, 349.23, 369.99, 392, 415.3, 440, 466.16, 493.88, 523.25, 554.37, 587.33, 622.25, 659.26, 698.46, 739.99, 783.99, 830.61, 880, 932.33, 987.77, 1046.5, 1108.73, 1174.66, 1244.51, 1318.51, 1396.91, 1479.98, 1567.98, 1661.22, 1760, 1864.66, 1975.53, 2093, 2217.46, 2349.32, 2489.02, 2637.02, 2793.83, 2959.96, 3135.96, 3322.44, 3520, 3729.31, 3951.07, 4186.01, 4434.92, 4698.64, 4978.03}; </p>

<p>Definido na linha <a class="el" href="../../#L22">22</a> do ficheiro <a class="el" href="../../">music.c</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Gerado em Tue Jun 1 22:05:38 2010 para FEUP-Defender por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
